var express = require('express')
var router = express.Router()
const { SysRoleController } = require('../controller/sys_role')
const passport = require('passport')
const { auth } = require('./../middleware/auth')
router.post(
  '/role/add',
  passport.authenticate('jwt', { session: false }),
  auth,
  SysRoleController.roleAdd
)
router.put(
  '/role/edit',
  passport.authenticate('jwt', { session: false }),
  auth,
  SysRoleController.roleUpd
)
router.delete(
  '/role/del',
  passport.authenticate('jwt', { session: false }),
  auth,
  SysRoleController.roleDel
)
router.get(
  '/role/list',
  passport.authenticate('jwt', { session: false }),
  auth,
  SysRoleController.roleList
)
router.put(
  '/role/menu',
  passport.authenticate('jwt', { session: false }),
  auth,
  SysRoleController.roleMenu
)
module.exports = router
